package com.ciaojian.core.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 券码-权益 关联表
 * </p>
 *
 * @author Atlakyn
 * @since 2021-04-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("j_coupon_code_member_detail")
@RequiredArgsConstructor
@NoArgsConstructor
public class CouponCodeMemberDetail extends Model<CouponCodeMemberDetail> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 券码id
     */
    @NonNull
    private Integer couponCodeId;

    /**
     * 权益id
     */
    @NonNull
    private Integer memberDetailId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
